#include <DHT.h>
#include <DHT_U.h>

#include <LiquidCrystal.h>

#define DHTPIN 7
#define DHTTYPE DHT11 
DHT dht(DHTPIN, DHTTYPE);

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int LED = 8;

void setup() {
  // put your setup code here, to run once:
  lcd.begin(16, 2);
  lcd.clear();
  pinMode(LED, OUTPUT);
  dht.begin();
  Serial.begin(9600);
  Serial.println("Ready");
}

void loop() {
  // put your main code here, to run repeatedly:
  delay(2000);
    float h = dht.readHumidity();
  float t = dht.readTemperature();
  if (isnan(h) || isnan(t)) {
    Serial.println(F("Failed to read from DHT sensor!"));
    return;
  }
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("t:");
  lcd.print(t);
  lcd.print("C");
  lcd.setCursor(0,1);
  lcd.print("h:");
  lcd.print(h);
  lcd.print("%");
  
  Serial.println(h);
  Serial.println(t);
}
